/*
 * Copyright 2002-2005 the original author or authors.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lib.jsonrpc;

import java.util.Collection;


/**
 * The Interface AccountService. The remote Interface of RPC Service.
 * 
 * 
 * @author jay liu
 * @since 07.10.2010
 */
public interface AccountService{

	/**
	 * Gets the account.
	 *
	 * @param name the name
	 * @return the account
	 */
	Account getAccount(String name);
	
	/**
	 * Gets the name.
	 *
	 * @param id the id
	 * @return the name
	 */
	String getName(Long id);
	
	/**
	 * Gets the id.
	 *
	 * @param name the name
	 * @return the id
	 */
	Long getId(String name);
	
	/**
	 * Gets the age.
	 *
	 * @param name the name
	 * @return the age
	 */
	Integer getAge(String name);
	
	/**
	 * Gets the balance.
	 *
	 * @param account the account
	 * @return the balance
	 */
	Double getBalance(Account account);
	
	/**
	 * Gets the accounts.
	 *
	 * @return the accounts
	 */
	Collection<Account> getAccounts();
	
}
